@extends('layouts.master')

@section('title')
@parent
:: Scan Document
@stop

@section('content')

<div class="row">
	<br />
</div>
{{ Form::open(array('url' => 'scanDocumentS3/' . $template->id, 'method' => 'post', 'class' => 'form-horizontal')) }}	
<div class="row">
	<div class="col-md-6 col-lg-6">
		<div class="show-gallery">
			
			<div class="row">
				@foreach ($files as $file)
				<div class="col-md-4 col-lg-4">
					<a href="#" class="thumbnail">
						<img src="{{ url('uploads/' . Auth::User()->username . '/' . File::name($file) . '.' . File::extension($file)) }}" alt="...">
					</a>
				</div>
				@endforeach
			</div>
		</div>
	</div>
	<div class="col-md-6 col-lg-6">
		<div class="show-template">
			<h2>Template name : {{ $template->template_name }}</h2>
			
			@foreach ($template->templateParams as $templateParam)
				<div class="form-group">
					<div class="col-md-6">
						{{ Form::label('template_param_'.$templateParam->id, $templateParam->template_param_name, array('class' => 'control-label')) }}
						{{ Form::text('template_param_'.$templateParam->id, Input::old('template_param_'.$templateParam->id), array('class' => 'form-control')) }}
					</div>
				</div>
			@endforeach
		</div>		
	</div>
</div>
<div class="row">
	<div class="col-lg-12">
		{{Form::submit("Save", array("class"=>"btn btn-success pull-right"))}}
	</div>
</div>	
{{ Form::close() }}
@stop
